No more dependency of GNU Make 'eval' function, which is not present in
older versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
PROGRAMS = xc_restore
-xc_restore_OBJS = xc_restore.o
-
-LDLIBS = -L$(XEN_LIBXC) -L$(XEN_LIBXUTIL) -lxc -lxutil
+LDLIBS = -L$(XEN_LIBXC) -lxc -L$(XEN_LIBXUTIL) -lxutil
.PHONY: all
all: build
build: $(PROGRAMS)
-define PROGRAM_template
-$(1): $$($(1)_OBJS)
- $$(LINK.o) $$^ $$(LDLIBS) -o $$@
-ALL_OBJS += $$($(1)_OBJS)
-endef
-
-$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
+$(PROGRAMS): %: %.o
+ $(LINK.o) $^ $(LDLIBS) -o $@
.PHONY: install
install: build
clean:
- $(RM) $(ALL_OBJS) $(PROGRAMS)
+ $(RM) *.o $(PROGRAMS)
$(RM) $(PROG_DEP)
-include $(PROG_DEP)